<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        //拿到国家数据赋给模板
        //echo "string";
        //exit;
        $state=M("country")->where("pid=0")->order("ename")->select();
        $this->assign("state",$state);
        //拿到渠道数据赋给模板
        $channel= M("channel")->select();
        $this->assign("channel",$channel);
        $this->display("index");
    }
    public function _empty(){
        $this->display("Public:404");
    }
}